<!-- Created by Lxy at 2017/11/25 17:36. -->
#define columned(e)
    #if(e == column??"") layui-this #end
#end

#define keywords(str)
    #if(str)
        #(str)、redkale社区
    #else
        架构设计、问题解答、经验分享、redkale社区、#(str)
    #end
#end


#define description(str)
    #if(str)
        #(str)、redkale社区
    #else
        架构设计、问题解答、经验分享、redkale社区、#(str)
    #end
#end

#define layout()
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>#if(title)#(title) - #end Redbbs社区</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="Cache-Control" content="max-age=7200" />
    <meta name="keywords" content="#@keywords(bean.title??'')">
    <meta name="description" content="#@description(bean.title??'')">
    <link rel="stylesheet" href="/res/layui/css/layui.css">
    <link rel="stylesheet" href="/res/css/global.css">
    <!--background-color: #4a184c;-->
    <style>
        .layui-bg-black,.layui-btn,.layui-laypage .layui-laypage-curr .layui-laypage-em{background-image: linear-gradient(350deg, #330335, #AB5D7C);}
        .laypage-main{border:1px solid #a25677!important;}
        .laypage-main *{border-right:#a25677;border-bottom:#a25677;}
        .layui-nav *{font-size:16px}
        .layui-nav-tree .layui-nav-child dd.layui-this, .layui-nav-tree .layui-nav-child dd.layui-this a, .layui-nav-tree .layui-this, .layui-nav-tree .layui-this>a, .layui-nav-tree .layui-this>a:hover
        {background-color:#4a184c;}
    </style>
    #@css?()
</head>
<body>

<div class="fly-header layui-bg-black">
    <div class="layui-container">
        <a class="fly-logo" href="/" style="font-size: 30px;color: #fff;">
            Redbbs
            <!--<img src="/res/images/logo.png" alt="优乐园社区">-->
        </a>
        <ul class="layui-nav fly-nav layui-hide-xs">
            <li class="layui-nav-item layui-this">
                <a href="/">社区</a>
            </li>
            <li class="layui-nav-item">
                <a href="/project">项目</a>
            </li>
            <li class="layui-nav-item">
                <a href="http://redkale.org/" target="_blank">Redkale框架</a>
            </li>
            <!--<li class="layui-nav-item">
                <a href="http://redkale.org/articles.html" target="_blank">技术文章</a>
            </li>-->
        </ul>

        <ul class="layui-nav fly-nav-user">
            #if(mine)<!-- 登入后的状态 -->
            <li class="layui-nav-item">
                <a class="fly-nav-avatar" href="javascript:;">
                    <cite class="layui-hide-xs">#(mine.nickname)</cite>
                    <!--
                    <i class="iconfont icon-renzheng layui-hide-xs" title="认证信息：layui 作者"></i>
                    <i class="layui-badge fly-badge-vip layui-hide-xs">VIP3</i>
                    -->
                    <img src="#(mine.avatar)">
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="/user/set"><i class="layui-icon">&#xe620;</i>基本设置</a></dd>
                    <!--
                    <dd><a href="/user/message"><i class="iconfont icon-tongzhi" style="top: 4px;"></i>我的消息</a></dd>
                    -->
                    <dd><a href="/user"><i class="layui-icon" style="margin-left: 2px; font-size: 22px;">&#xe68e;</i>我的主页</a></dd>
                    <hr style="margin: 5px 0;">
                    <dd><a href="javascript:;" class="logout" style="text-align: center;">退出</a></dd>
                </dl>
            </li>
            #else<!-- 未登入的状态 -->
                <li class="layui-nav-item">
                    <a class="iconfont icon-touxiang layui-hide-xs" href="/user/login"></a>
                </li>
                <li class="layui-nav-item">
                    <a href="/user/login.html">登入</a>
                </li>
                <li class="layui-nav-item">
                    <a href="/user/reg.html">注册</a>
                </li>
                <!--<li class="layui-nav-item layui-hide-xs">
                    <a href="/app/qq/" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})" title="QQ登入" class="iconfont icon-qq"></a>
                </li>
                <li class="layui-nav-item layui-hide-xs">
                    <a href="/app/weibo/" onclick="layer.msg('正在通过微博登入', {icon:16, shade: 0.1, time:0})" title="微博登入" class="iconfont icon-weibo"></a>
                </li>-->
            #end
        </ul>
    </div>
</div>

<!--main-->
#@main?()

<div class="fly-footer">
    <p>
        <a href="http://1216.top" target="_blank">Redbbs 2017 &copy; http://1216.top</a>
        <a href='https://gitee.com/tc608/redbbs' target="_blank"><img src='https://gitee.com/tc608/redbbs/badge/star.svg?theme=white' alt='star'/></a>
    </p>
    #define x()
    <p>
        <a href="http://fly.layui.com/jie/3147/" target="_blank">付费计划</a>
        <a href="http://fly.layui.com/jie/8157/" target="_blank">获取Fly社区模版</a>
        <a href="http://fly.layui.com/jie/2461/" target="_blank">微信公众号</a>
    </p>
    #end
</div>
<script src="/res/layui/layui.js"></script>
#@js?()

</body>
</html>
#end

#define flyColumn()
<div class="fly-panel fly-column">
    <div class="layui-container">
        <ul class="layui-clear">
            <li class="layui-hide-xs #@columned('')"><a href="/column/">全部</a></li>
            <li class="#@columned('qz')"><a href="/column/qz">求助</a></li>
            <li class="#@columned('fx')"><a href="/column/fx">分享<!--<span class="layui-badge-dot"></span>--></a></li>
            <!--
            <li class="#@columned('jy')"><a href="/column/jy">建议</a></li>
            <li class="#@columned('gg')"><a href="/column/gg">公告</a></li>
            -->
            <li class="#@columned('dt')"><a href="/column/dt">动态</a></li>
            <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><span class="fly-mid"></span></li>

            <!-- 用户登入后显示 -->
            <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a href="/user?#index">我发表的贴</a></li>
            <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a href="/user?#collection">我收藏的贴</a></li>
        </ul>

        <div class="fly-column-right layui-hide-xs">
            <span class="fly-search"><i class="layui-icon"></i></span>
            <a href="/jie/add" class="layui-btn">发表新帖</a>
        </div>
        <div class="layui-hide-sm layui-show-xs-block" style="margin-top: -10px; padding-bottom: 10px; text-align: center;">
            <a href="/jie/add" class="layui-btn">发表新帖</a>
        </div>
    </div>
</div>
#end

#define user_side(e)
<ul class="layui-nav layui-nav-tree layui-inline" lay-filter="user">
    <li class="layui-nav-item #if(e == '') layui-this #end">
        <a href="/user/#(mine.userid)">
            <i class="layui-icon">&#xe609;</i>
            我的主页
        </a>
    </li>
    <li class="layui-nav-item #if(e == 'index') layui-this #end">
        <a href="/user/">
            <i class="layui-icon">&#xe612;</i>
            用户中心
        </a>
    </li>
    <li class="layui-nav-item #if(e == 'set') layui-this #end">
        <a href="/user/set">
            <i class="layui-icon">&#xe620;</i>
            基本设置
        </a>
    </li>
    <!--<li class="layui-nav-item #if(e == 'message') layui-this #end">
        <a href="message.html">
            <i class="layui-icon">&#xe611;</i>
            我的消息
        </a>
    </li>-->
</ul>
#end